package com.sx.gongzhong.pest;

import com.sx.gongzhong.model.HeadParamBean;
import com.sx.gongzhong.model.PublicBean;
import com.sx.gongzhong.model.ReplyUserBean;
import com.sx.gongzhong.net.AppealManager;
import com.sx.gongzhong.net.BaseCallBack;
import com.sx.gongzhong.view.OrgView;

import java.util.List;
import java.util.Map;

/**便民诉求 选项辖区
 * Created by admin on 2018/1/10.
 */

public class OrgPest {
    private OrgView orgView;

    public OrgPest(OrgView orgView) {
        this.orgView = orgView;
    }

    public void getOrgList() {
        Map<String,Object> map = HeadParamBean.getHead();
        new AppealManager().getOrgList(map, new BaseCallBack<ReplyUserBean.BaseResult<List<PublicBean>>>() {
            @Override
            public void onSuccess(ReplyUserBean.BaseResult<List<PublicBean>> response) {
                orgView.getOrgListSuccess(response.data);
            }
            @Override
            public void onFailures(String message) {
                orgView.showError(message);
            }
        });
    }
    //GET /api/columnManage/convenientAppeal/getSelectOrgList
}
